package cn.itcast.nems.common.captcha;

import org.springframework.stereotype.Component;

import cn.itcast.nems.common.captcha.bean.CaptchaBean;

/**
 * 图片验证码
 * @author Tristan_Liu
 *
 */
@Component
public interface CaptchaService {
	
	/**
	 * 验证验证码是否正确
	 * @param captcha 验证码code
	 * @param token 
	 * @return
	 */
	public boolean verify(String captcha, String token);
	
	/**
	 * 生成验证码
	 * @return {@link CaptchaBean}
	 */
	public CaptchaBean generateCaptcha();
}
